package cartagows.wsframework.wscoordination;

import java.io.Serializable;

import cartago.CartagoException;
import cartagows.wsframework.core.FrameworkIDValidator;
import cartagows.wsframework.core.IOperation;

public class WSCoordinationOperation implements IOperation,Serializable{

	/*
	 * Fields containing the ids for the WSCoordination supported operations  
	 */

	private static final long serialVersionUID = 1L;
	public static final int REQUEST_NEW_COORDINATION_ACTIVITY_AT = 1;
	public static final int REQUEST_NEW_COORDINATION_ACTIVITY_BA = 2;
	public static final int REGISTER_PARTICIPANT = 3;
	
	private int operationID;
	
	public WSCoordinationOperation(int operationID) throws CartagoException{

		if(FrameworkIDValidator.getInstance().validateOperation(WSCoordinationOperation.class, operationID))
		{
			this.operationID = operationID;
		}
		else
			throw new CartagoException();
	}
	
 	public int getSpecificationID() {
		return IOperation.WS_COORDINATION;
	}
	
	public String getSpecificationDescription() {

		return "Class that contains all the operation relates to the WS-Coordination specification";
	}
	
	public int getOperationID(){
		return this.operationID;
	}
}